<template>
	<view class="flex-center-between u-p-t-20 u-p-b-16">
		<view>
			<view class="u-f-36 u-lh-50 font-medio">{{ item.title || '' }}</view>
			<view class="u-f-24 u-lh-32 u-m-t-4">{{ item.desc || '' }}</view>
			<view class="flex-center">
				<view style="color: #FC2642" class="flex-baseline u-f-40 u-lh-48 font-bold">
					<view class="u-f-26 u-lh-30">{{ lang_unit.money }}</view>
					<view>{{ item.discountPrice || 0 }}</view>
				</view>
				<view class="color-grew t-line u-f-24 u-lh-34 u-m-l-14">
					{{ lang_unit.money }}{{ item.price || 0 }}
				</view>
			</view>
		</view>
	
		<view>
			<view class="flex-between">
				<view></view>
				<x-common-btn width="138" height="54" fontSize="26" @click="buyCoupon(item)">{{ lang_common.purchase }}
				</x-common-btn>
			</view>
			<view class="u-m-t-22 color-grew">
				{{ lang_common.saled }}：{{ item.sellCount }}{{ lang_unit.sheets }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				default: () => ({})
			}
		},
		methods: {
			// 触发购买优惠券
			buyCoupon(item) {
				this.jumpUrl(`/pages/user/shop/detail/detail?type=coupon&goodsId=${ item.goodsId }`)
				// uni.navigateTo({
				// 	url: `/pages/user/order/ready/ready`,
				// 	success: res => {
				// 		res.eventChannel.emit('order-ready', { list: [{ ...item, goodsType: 5 }] })
				// 	}
				// })
			}
		}
	}
</script>

<style>
</style>